Optimal. Leaf size=9 \[ -x-\tanh ^{-1}(\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0784214, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {4391, 2839, 3770, 8} \[ -x-\tanh ^{-1}(\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4391
Rule 2839
Rule 3770
Rule 8
Rubi steps
\begin{align*} \int \frac{\cot (x)}{\sec (x)+\tan (x)} \, dx &=\int \frac{\cos (x) \cot (x)}{1+\sin (x)} \, dx\\ &=-\int 1 \, dx+\int \csc (x) \, dx\\ &=-x-\tanh ^{-1}(\cos (x))\\ \end{align*}
Mathematica [B] time = 0.023098, size = 20, normalized size = 2.22 \[ -x+\log \left (\sin \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.099, size = 10, normalized size = 1.1 \begin{align*} \ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) -x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.62816, size = 31, normalized size = 3.44 \begin{align*} -2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) + \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.491269, size = 82, normalized size = 9.11 \begin{align*} -x - \frac{1}{2} \, \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) + \frac{1}{2} \, \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot{\left (x \right )}}{\tan{\left (x \right )} + \sec{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13378, size = 14, normalized size = 1.56 \begin{align*} -x + \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]